#ifndef _types_h
#define _types_h

#include <stdint.h>

#ifndef NDS
typedef uint8_t u8;
typedef uint16_t u16;
typedef uint32_t u32;
typedef uint64_t u64;
typedef int8_t s8;
typedef int16_t s16;
typedef int32_t s32;
typedef int64_t s64;
#endif // #ifndef NDS
#ifndef NULL
#define NULL __null
#endif // #ifndef NULL

template <class T>
struct v2
{
  union { T x; T w; };
  union { T y; T h; };
  inline v2() { x = y = 0; }
  inline v2(T _x, T _y) { x = _x; y = _y; }
};

template <class T>
struct v3
{
  union { T x; T w; };
  union { T y; T h; };
  T z;
  inline v3() { x = y = z = 0; }
  inline v3(T _x, T _y, T _z) { x = _x; y = _y; z = _z; }
};

#include <string>
using std::string;

#endif // #ifndef _types_h
